IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SrvrInstncCfg1MSSQL]') AND type in (N'U'))
BEGIN
     DROP TABLE [dbo].[SrvrInstncCfg1MSSQL]
END
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[SrvrInstncCfg1MSSQL](
     [SrvrInstncId]               [int]          NOT NULL,
     [PackageExecutionId]         [int]          NOT NULL,
     [StartDt]                    [datetime]     NOT NULL,
     [EndDt]                      [datetime]     NOT NULL,
     [CurrentRecordFlag]          [tinyint]      NOT NULL CONSTRAINT [DF_SrvrInstncCfg1MSSQL_CurrentRecordFlag]  DEFAULT ((0)),
     [ClusteredFlag]              [tinyint]          NULL,
     [FullTextInstalledFlag]      [tinyint]          NULL,
     [IntegratedSecurityOnlyFlag] [tinyint]          NULL,
     [ProductVersion]             [varchar](30)      NULL,
     [ProductLevel]               [varchar](30)      NULL,
     [ProductArchitecture]        [varchar](6)       NULL,
     [ServerEdition]              [varchar](128)     NULL,
     [LicenseType]                [varchar](30)      NULL,
     [NumberOfLicenses]           [int]              NULL,
     [SrvrCollation]              [varchar](128)     NULL,
     [SrvrMinMemoryMB]            [int]              NULL,
     [SrvrMaxMemoryMB]            [int]              NULL,
     [LastModDt]                  [datetime]     NOT NULL CONSTRAINT [DF_SrvrInstncCfg1MSSQL_LastModDt]  DEFAULT (getdate()),
     CONSTRAINT [PK_SrvrInstncCfg1MSSQL] PRIMARY KEY CLUSTERED ( [SrvrInstncId] ASC, [StartDt] ASC )
) ON [PRIMARY]
GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Unique Identifier of a particular Database Server Instance.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'SrvrInstncId'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Execution Id of the package that populated or updated this row (usually by SSIS).' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'PackageExecutionId'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Effective start date of this record.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'StartDt'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Effective end date of this record.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'EndDt'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Flag indicating that this record is the current record.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'CurrentRecordFlag'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Flag indicating whether server is clustered.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'ClusteredFlag'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Flag indicating whether the full-text server is installed.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'FullTextInstalledFlag'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Flag indicating whether server is configured for integrated security only.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'IntegratedSecurityOnlyFlag'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Version of the SQL Server.  For MSSQL often expressed as: major.minor.build' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'ProductVersion'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Level of the version of the SQL Server.  For MSSQL often expressed as: RTM, SP1, SP2, CTP' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'ProductLevel'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Edition of the SQL Server.  For MSSQL often expressed as: Standard Edition, Enterprise Edition' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'ServerEdition'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Type of server license, often disabled.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'LicenseType'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Number of licensed CALs whether processor or client.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'NumberOfLicenses'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Default Collation of the SQL Server.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'SrvrCollation'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Minimum configured server memory in MB.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'SrvrMinMemoryMB'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Maximum configured server memory in MB.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL', @level2type=N'COLUMN',@level2name=N'SrvrMaxMemoryMB'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Server instance configuration data for MSSQL Servers.  Contains effective dated list of server instance configuration data for a MSSQL type server.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncCfg1MSSQL'
GO
